import { Module } from 'vuex';
import {Session} from '../../utils/storage';

interface UserInfo {
    phoneNumber: string;
    passWord: string;
}

interface State {
    userInfo: UserInfo;
    menulist: any;
}

const userInfosModule: Module<State, any> = {
    namespaced: true,
    state: {
        userInfo: {
            phoneNumber: '',
            passWord:'',
        },
        menulist:[],
    },
    mutations: {
        setUserInfo(state, menulist) {
            console.log('2==============>',menulist)
            state.userInfo = menulist;
        }
    },
    actions: {
        setUserInfo({commit}, menulist) {
            console.log('111111============>',menulist)
            commit('setUserInfo', menulist);
        }
    }
}
export default userInfosModule;
